package com.appbee.core.server.model;

import java.util.Date;

import javax.persistence.Basic;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Version;

import com.appbee.core.shared.model.HasEditDateTime;
import com.appbee.core.shared.model.HasLongId;

@MappedSuperclass
public abstract class LiteEditEntity implements HasEditDateTime,HasLongId
{
	private Long id;
	private Date editDateTime;
	private int version;
	
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	public Long getId()
	{
		return id;
	}

	
	public void setId(Long id)
	{
		this.id = id;
	}

	@Basic
	@Temporal(TemporalType.TIMESTAMP)
	public Date getEditDateTime()
	{
		return editDateTime;
	}
	public void setEditDateTime(Date editDateTime)
	{
		this.editDateTime = editDateTime;
	}

	@Basic
	@Version
	public int getVersion()
	{
		return version;
	}

	public void setVersion(int version)
	{
		this.version = version;
	}

	
	
}
